package com.liuxin.zhiyuan.shujuzhongxin.controller;

import java.util.Arrays;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.liuxin.zhiyuan.shujuzhongxin.domain.po.CareerinfoEntity;
import com.liuxin.zhiyuan.shujuzhongxin.service.CareerinfoService;
import com.liuxin.common.utils.PageUtils;
import com.liuxin.common.utils.R;



/**
 * 
 *
 * @author zsl
 * @email 1301966496@qq.com
 * @date 2025-10-19 11:29:13
 */
@RestController
@RequestMapping("shujuzhongxin/careerinfo")
public class CareerinfoController {
    @Autowired
    private CareerinfoService careerinfoService;

    /**
     * 列表
     */
    @RequestMapping("/list")
    //@RequiresPermissions("shujuzhongxin:careerinfo:list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = careerinfoService.queryCareerInfoPage(params);

        return R.ok().put("data", page);
    }


    /**
     * 信息
     */
    @RequestMapping("/info")
    //@RequiresPermissions("shujuzhongxin:careerinfo:info")
    public R info(@RequestParam("id") Integer id){
		CareerinfoEntity careerinfo = careerinfoService.getById(id);
        return R.ok().put("data", careerinfo);
    }

    /**
     * 保存
     */
    @RequestMapping("/save")
    //@RequiresPermissions("shujuzhongxin:careerinfo:save")
    public R save(@RequestBody CareerinfoEntity careerinfo){
		careerinfoService.save(careerinfo);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
   //@RequiresPermissions("shujuzhongxin:careerinfo:update")
    public R update(@RequestBody CareerinfoEntity careerinfo){
		careerinfoService.updateById(careerinfo);
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    //@RequiresPermissions("shujuzhongxin:careerinfo:delete")
    public R delete(@RequestBody Integer[] ids){
		careerinfoService.removeByIds(Arrays.asList(ids));
        return R.ok();
    }

}
